package com.longtop.perform.zb.system.web;

import java.util.HashMap;
import java.util.Map;

import com.longtop.framework.base.BaseAction;
import com.longtop.framework.util.WebUtil;
import com.longtop.intelliweb.action.IInitContext;
import com.longtop.intelliweb.view.Dataset;
import com.longtop.perform.zb.system.service.SystemClassService;

/**
 * 
 * @author 孙景弘
 * 
 */
public class SystemDropDownAction extends BaseAction {

	private SystemClassService service;
	private static final String DATASET_INDEXSYS = "Dataset_indexSys";// 指标体系

	// 查询条件：
	Map<String, Object> queryMap = new HashMap<String, Object>();

	public SystemDropDownAction() {
		this.service = this.getBean(SystemClassService.BEAN_ID);
	}

	/**
	 * 系统共用：初始化调用
	 */
	public void init(IInitContext context) {
		super.init(context);
	}

	/**
	 * 本页jsp：初始化业务数据(覆写父类方法)
	 */
	public void thisPageInit(IInitContext context) {
		Dataset dataset = this.getDataset(context, DATASET_INDEXSYS);
		if (!WebUtil.validateDatasetExist(this, dataset, DATASET_INDEXSYS))
			return;
		String systemId = this.getParameter(context, "systemId");
		queryMap.put("systemId", systemId);
		service.queryForPageByIbatis("khygProjectSql.queryIndexsTree", null, queryMap, dataset, false);
	}

}
